<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMimeMessage: GMime 3.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GMime 3.0 Reference Manual">
<link rel="up" href="MimeParts.html" title="MIME Messages and Parts">
<link rel="prev" href="GMimeObject.html" title="GMimeObject">
<link rel="next" href="GMimePart.html" title="GMimePart">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GMimeMessage.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GMimeMessage.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="MimeParts.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GMimeObject.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GMimePart.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GMimeMessage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GMimeMessage.top_of_page"></a>GMimeMessage</span></h2>
<p>GMimeMessage — Messages</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GMimeMessage.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="returnvalue">GMimeMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-new" title="g_mime_message_new ()">g_mime_message_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-sender" title="g_mime_message_get_sender ()">g_mime_message_get_sender</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-from" title="g_mime_message_get_from ()">g_mime_message_get_from</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-reply-to" title="g_mime_message_get_reply_to ()">g_mime_message_get_reply_to</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-to" title="g_mime_message_get_to ()">g_mime_message_get_to</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-cc" title="g_mime_message_get_cc ()">g_mime_message_get_cc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-bcc" title="g_mime_message_get_bcc ()">g_mime_message_get_bcc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-add-mailbox" title="g_mime_message_add_mailbox ()">g_mime_message_add_mailbox</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-addresses" title="g_mime_message_get_addresses ()">g_mime_message_get_addresses</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-all-recipients" title="g_mime_message_get_all_recipients ()">g_mime_message_get_all_recipients</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-set-subject" title="g_mime_message_set_subject ()">g_mime_message_set_subject</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-subject" title="g_mime_message_get_subject ()">g_mime_message_get_subject</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-set-date" title="g_mime_message_set_date ()">g_mime_message_set_date</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GDateTime</span> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-date" title="g_mime_message_get_date ()">g_mime_message_get_date</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-set-message-id" title="g_mime_message_set_message_id ()">g_mime_message_set_message_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-message-id" title="g_mime_message_get_message_id ()">g_mime_message_get_message_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-set-mime-part" title="g_mime_message_set_mime_part ()">g_mime_message_set_mime_part</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GMimeObject.html" title="GMimeObject"><span class="returnvalue">GMimeObject</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-mime-part" title="g_mime_message_get_mime_part ()">g_mime_message_get_mime_part</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-foreach" title="g_mime_message_foreach ()">g_mime_message_foreach</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GMimeObject.html" title="GMimeObject"><span class="returnvalue">GMimeObject</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-body" title="g_mime_message_get_body ()">g_mime_message_get_body</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="returnvalue">GMimeAutocryptHeader</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-autocrypt-header" title="g_mime_message_get_autocrypt_header ()">g_mime_message_get_autocrypt_header</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="returnvalue">GMimeAutocryptHeaderList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-autocrypt-gossip-headers-from-inner-part" title="g_mime_message_get_autocrypt_gossip_headers_from_inner_part ()">g_mime_message_get_autocrypt_gossip_headers_from_inner_part</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="returnvalue">GMimeAutocryptHeaderList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeMessage.html#g-mime-message-get-autocrypt-gossip-headers" title="g_mime_message_get_autocrypt_gossip_headers ()">g_mime_message_get_autocrypt_gossip_headers</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeMessage.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GMimeMessage.html#GMimeAddressType" title="enum GMimeAddressType">GMimeAddressType</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GMimeMessage.html#GMimeMessage-struct" title="struct GMimeMessage">GMimeMessage</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeMessage.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> <a class="link" href="GMimeObject.html" title="GMimeObject">GMimeObject</a>
        <span class="lineart">╰──</span> GMimeMessage
</pre>
</div>
<div class="refsect1">
<a name="GMimeMessage.description"></a><h2>Description</h2>
<p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> represents an rfc822 message.</p>
</div>
<div class="refsect1">
<a name="GMimeMessage.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-mime-message-new"></a><h3>g_mime_message_new ()</h3>
<pre class="programlisting"><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="returnvalue">GMimeMessage</span></a> *
g_mime_message_new (<em class="parameter"><code><span class="type">gboolean</span> pretty_headers</code></em>);</pre>
<p>If <em class="parameter"><code>pretty_headers</code></em>
 is <code class="literal">TRUE</code>, then the standard rfc822 headers are
initialized so as to put headers in a nice friendly order. This is
strictly a cosmetic thing, so if you are unsure, it is safe to say
no (<code class="literal">FALSE</code>).</p>
<div class="refsect3">
<a name="g-mime-message-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pretty_headers</p></td>
<td class="parameter_description"><p>make pretty headers </p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-new.returns"></a><h4>Returns</h4>
<p> an empty <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> object.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-sender"></a><h3>g_mime_message_get_sender ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_sender (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the parsed list of addresses in the Sender header.</p>
<div class="refsect3">
<a name="g-mime-message-get-sender.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-sender.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the Sender header. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-from"></a><h3>g_mime_message_get_from ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_from (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the parsed list of addresses in the From header.</p>
<div class="refsect3">
<a name="g-mime-message-get-from.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-from.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the From header. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-reply-to"></a><h3>g_mime_message_get_reply_to ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_reply_to (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the parsed list of addresses in the Reply-To header.</p>
<div class="refsect3">
<a name="g-mime-message-get-reply-to.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-reply-to.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the Reply-To header. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-to"></a><h3>g_mime_message_get_to ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_to (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets combined list of parsed addresses in the To header(s).</p>
<div class="refsect3">
<a name="g-mime-message-get-to.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-to.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the To header(s). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-cc"></a><h3>g_mime_message_get_cc ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_cc (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets combined list of parsed addresses in the Cc header(s).</p>
<div class="refsect3">
<a name="g-mime-message-get-cc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-cc.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the Cc header(s). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-bcc"></a><h3>g_mime_message_get_bcc ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_bcc (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets combined list of parsed addresses in the Bcc header(s).</p>
<div class="refsect3">
<a name="g-mime-message-get-bcc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-bcc.returns"></a><h4>Returns</h4>
<p>the parsed list of addresses in the Bcc header(s). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-add-mailbox"></a><h3>g_mime_message_add_mailbox ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_add_mailbox (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                            <em class="parameter"><code><a class="link" href="GMimeMessage.html#GMimeAddressType" title="enum GMimeAddressType"><span class="type">GMimeAddressType</span></a> type</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *addr</code></em>);</pre>
<p>Add a mailbox of a chosen type to the MIME message.</p>
<p>Note: The <em class="parameter"><code>name</code></em>
 (and <em class="parameter"><code>addr</code></em>
) strings should be in UTF-8.</p>
<div class="refsect3">
<a name="g-mime-message-add-mailbox.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html#GMimeAddressType" title="enum GMimeAddressType"><span class="type">GMimeAddressType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The name of the mailbox (or <code class="literal">NULL</code>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The address of the mailbox</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-addresses"></a><h3>g_mime_message_get_addresses ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_addresses (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                              <em class="parameter"><code><a class="link" href="GMimeMessage.html#GMimeAddressType" title="enum GMimeAddressType"><span class="type">GMimeAddressType</span></a> type</code></em>);</pre>
<p>Gets a list of addresses of the specified <em class="parameter"><code>type</code></em>
 from the <em class="parameter"><code>message</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-message-get-addresses.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html#GMimeAddressType" title="enum GMimeAddressType"><span class="type">GMimeAddressType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-addresses.returns"></a><h4>Returns</h4>
<p>a list of addresses of the specified
<em class="parameter"><code>type</code></em>
from the <em class="parameter"><code>message</code></em>
. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-all-recipients"></a><h3>g_mime_message_get_all_recipients ()</h3>
<pre class="programlisting"><a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="returnvalue">InternetAddressList</span></a> *
g_mime_message_get_all_recipients (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the complete list of recipients for <em class="parameter"><code>message</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-message-get-all-recipients.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-all-recipients.returns"></a><h4>Returns</h4>
<p>a newly allocated <a class="link" href="InternetAddressList.html" title="InternetAddressList"><span class="type">InternetAddressList</span></a>
containing all recipients of the message or <code class="literal">NULL</code> if no recipients
are set. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-set-subject"></a><h3>g_mime_message_set_subject ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_set_subject (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *subject</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *charset</code></em>);</pre>
<p>Set the subject of a <em class="parameter"><code>message</code></em>
.</p>
<p>Note: The <em class="parameter"><code>subject</code></em>
 string should be in UTF-8.</p>
<div class="refsect3">
<a name="g-mime-message-set-subject.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subject</p></td>
<td class="parameter_description"><p>Subject string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>charset</p></td>
<td class="parameter_description"><p>The charset to use for encoding the subject or <code class="literal">NULL</code> to use the default</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-subject"></a><h3>g_mime_message_get_subject ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
g_mime_message_get_subject (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the subject of the <em class="parameter"><code>message</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-message-get-subject.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-subject.returns"></a><h4>Returns</h4>
<p> the subject of the <em class="parameter"><code>message</code></em>
in a form suitable for display
or <code class="literal">NULL</code> if no subject is set. If not <code class="literal">NULL</code>, the returned string
will be in UTF-8.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-set-date"></a><h3>g_mime_message_set_date ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_set_date (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                         <em class="parameter"><code><span class="type">GDateTime</span> *date</code></em>);</pre>
<p>Sets the Date header on a MIME Message.</p>
<div class="refsect3">
<a name="g-mime-message-set-date.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>date</p></td>
<td class="parameter_description"><p>a date to be used in the Date header</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-date"></a><h3>g_mime_message_get_date ()</h3>
<pre class="programlisting"><span class="returnvalue">GDateTime</span> *
g_mime_message_get_date (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the parsed date and time value from the Date header.</p>
<div class="refsect3">
<a name="g-mime-message-get-date.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-date.returns"></a><h4>Returns</h4>
<p> a <span class="type">GDateTime</span> on success or <code class="literal">NULL</code> if the date could not be parsed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-set-message-id"></a><h3>g_mime_message_set_message_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_set_message_id (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                               <em class="parameter"><code>const <span class="type">char</span> *message_id</code></em>);</pre>
<p>Set the Message-Id on a message.</p>
<div class="refsect3">
<a name="g-mime-message-set-message-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message_id</p></td>
<td class="parameter_description"><p>message-id (addr-spec portion)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-message-id"></a><h3>g_mime_message_get_message_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
g_mime_message_get_message_id (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the Message-Id header of <em class="parameter"><code>message</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-message-get-message-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-message-id.returns"></a><h4>Returns</h4>
<p> the Message-Id of a message.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-set-mime-part"></a><h3>g_mime_message_set_mime_part ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_set_mime_part (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                              <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *mime_part</code></em>);</pre>
<p>Set the root-level MIME part of the message.</p>
<div class="refsect3">
<a name="g-mime-message-set-mime-part.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime_part</p></td>
<td class="parameter_description"><p>The root-level MIME Part</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-mime-part"></a><h3>g_mime_message_get_mime_part ()</h3>
<pre class="programlisting"><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="returnvalue">GMimeObject</span></a> *
g_mime_message_get_mime_part (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Gets the toplevel MIME part contained within <em class="parameter"><code>message</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-message-get-mime-part.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-mime-part.returns"></a><h4>Returns</h4>
<p>the toplevel MIME part of <em class="parameter"><code>message</code></em>
. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-foreach"></a><h3>g_mime_message_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_message_foreach (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                        <em class="parameter"><code><a class="link" href="GMimeObject.html#GMimeObjectForeachFunc" title="GMimeObjectForeachFunc ()"><span class="type">GMimeObjectForeachFunc</span></a> callback</code></em>,
                        <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>Recursively calls <em class="parameter"><code>callback</code></em>
 on each of the mime parts in the mime message.</p>
<div class="refsect3">
<a name="g-mime-message-foreach.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>function to call on each of the mime parts
contained by the mime message. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user-supplied callback data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-body"></a><h3>g_mime_message_get_body ()</h3>
<pre class="programlisting"><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="returnvalue">GMimeObject</span></a> *
g_mime_message_get_body (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>);</pre>
<p>Attempts to identify the MIME part containing the body of the
message.</p>
<div class="refsect3">
<a name="g-mime-message-get-body.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-body.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> containing the textual
content that appears to be the main body of the message.</p>
<p>Note: This function is NOT guaranteed to always work as it
makes some assumptions that are not necessarily true. It is
recommended that you traverse the MIME structure yourself. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-autocrypt-header"></a><h3>g_mime_message_get_autocrypt_header ()</h3>
<pre class="programlisting"><a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="returnvalue">GMimeAutocryptHeader</span></a> *
g_mime_message_get_autocrypt_header (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                                     <em class="parameter"><code><span class="type">GDateTime</span> *now</code></em>);</pre>
<p>Creates a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="type">GMimeAutocryptHeader</span></a> based on the relevant Autocrypt
header associated with the sender of an e-mail message.</p>
<p>If the message has no sender in the From: field, or has more than
one sender, then this function will return <code class="literal">NULL</code>.  Autocrypt should
ignore the message entirely.</p>
<p>If there is one sender, but no single Autocrypt header is found
that matches that e-mail address, a <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="type">GMimeAutocryptHeader</span></a> will be
returned for the sender, but it will be incomplete (see
<a class="link" href="gmime-gmime-autocrypt.html#g-mime-autocrypt-header-is-complete" title="g_mime_autocrypt_header_is_complete ()"><span class="type">g_mime_autocrypt_header_is_complete</span></a>).</p>
<p>Note that the following types of Autocrypt headers will not be
returned by this function:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>headers that do not match an address in "From:"</p></li>
<li class="listitem"><p>unparseable headers</p></li>
<li class="listitem"><p>headers with unknown critical attributes</p></li>
<li class="listitem"><p>duplicate valid headers for the sender's address</p></li>
</ul></div>
<p>The returned Autocrypt header will have its effective_date set to
the earliest of either:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>the Date: header of the message or </p></li>
<li class="listitem"><p><em class="parameter"><code>now</code></em>
 (or the current time, if <em class="parameter"><code>now</code></em>
 is <code class="literal">NULL</code>)</p></li>
</ul></div>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-header.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>now</p></td>
<td class="parameter_description"><p>a <span class="type">GDateTime</span> object, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-header.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="type">GMimeAutocryptHeader</span></a> object,
or <code class="literal">NULL</code> if the message should be ignored for purposes of
Autocrypt. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-autocrypt-gossip-headers-from-inner-part"></a><h3>g_mime_message_get_autocrypt_gossip_headers_from_inner_part ()</h3>
<pre class="programlisting"><a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="returnvalue">GMimeAutocryptHeaderList</span></a> *
g_mime_message_get_autocrypt_gossip_headers_from_inner_part
                               (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                                <em class="parameter"><code><span class="type">GDateTime</span> *now</code></em>,
                                <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *inner_part</code></em>);</pre>
<p>Creates a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="type">GMimeAutocryptHeaderList</span></a> of relevant headers of the
given type based on the recipient(s) of an e-mail message.</p>
<p>You must pass the decrypted inner part of the message to this
function, since Autocrypt-Gossip headers are only stored within the
encrypted layer.</p>
<p>If you don't already have the decrypted inner part available to
you, you probably want to use
<a class="link" href="GMimeMessage.html#g-mime-message-get-autocrypt-gossip-headers" title="g_mime_message_get_autocrypt_gossip_headers ()"><span class="type">g_mime_message_get_autocrypt_gossip_headers</span></a> instead.</p>
<p>Each header in the returned list will:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>have a valid address</p></li>
<li class="listitem"><p>be of the type requested</p></li>
<li class="listitem"><p>be complete</p></li>
</ul></div>
<p>If no Autocrypt header is found for a recipient, no
<a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeader" title="struct GMimeAutocryptHeader"><span class="type">GMimeAutocryptHeader</span></a> will be in the list associated with that e-mail address.</p>
<p>Note that the following types of Autocrypt headers will not be
returned by this function:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>headers of an unrequested type</p></li>
<li class="listitem"><p>headers that do not match an address in "From:"</p></li>
<li class="listitem"><p>unparseable headers</p></li>
<li class="listitem"><p>headers with unknown critical attributes</p></li>
<li class="listitem"><p>duplicate valid headers for a given address</p></li>
</ul></div>
<p>On error (e.g. if this version of GMime cannot handle the requested
Autocrypt type, or if a parameter is missing or malformed), returns
<code class="literal">NULL</code></p>
<p>The returned Autocrypt headers will have their effective_date set
to the earliest of either:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>the Date: header of the message or </p></li>
<li class="listitem"><p><em class="parameter"><code>now</code></em>
 (or the current time, if <em class="parameter"><code>now</code></em>
 is <code class="literal">NULL</code>)</p></li>
</ul></div>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-gossip-headers-from-inner-part.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>now</p></td>
<td class="parameter_description"><p>a <span class="type">GDateTime</span> object, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inner_part</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> which is the cleartext part of the inner message</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-gossip-headers-from-inner-part.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="type">GMimeAutocryptHeaderList</span></a> object, or <code class="literal">NULL</code> on error. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-message-get-autocrypt-gossip-headers"></a><h3>g_mime_message_get_autocrypt_gossip_headers ()</h3>
<pre class="programlisting"><a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="returnvalue">GMimeAutocryptHeaderList</span></a> *
g_mime_message_get_autocrypt_gossip_headers
                               (<em class="parameter"><code><a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> *message</code></em>,
                                <em class="parameter"><code><span class="type">GDateTime</span> *now</code></em>,
                                <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html#GMimeDecryptFlags" title="enum GMimeDecryptFlags"><span class="type">GMimeDecryptFlags</span></a> flags</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *session_key</code></em>,
                                <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
<p>Creates a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="type">GMimeAutocryptHeaderList</span></a> of relevant headers of the
given type based on the recipient(s) of an e-mail message.</p>
<p>Returns the same object as
<span class="type">g_mime_message_get_autocrypt_gossip_headers_with_inner_part</span> , but
handles decryption and cleanup automatically.</p>
<p><em class="parameter"><code>flags</code></em>
 and <em class="parameter"><code>session_key</code></em>
 are passed through to
<a class="link" href="GMimeMultipartEncrypted.html#g-mime-multipart-encrypted-decrypt" title="g_mime_multipart_encrypted_decrypt ()"><span class="type">g_mime_multipart_encrypted_decrypt</span></a>, as needed.</p>
<p>If the message is not actually an encrypted message, returns <code class="literal">NULL</code>:
it should be ignored for purposes of evaluating gossip.</p>
<p>If decryption fails, returns <code class="literal">NULL</code>.  In this case, an exception
will be set on <em class="parameter"><code>err</code></em>
 to provide information about the decryption
failure.</p>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-gossip-headers.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeMessage.html" title="GMimeMessage"><span class="type">GMimeMessage</span></a> object, which is expected to be encrypted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>now</p></td>
<td class="parameter_description"><p>a <span class="type">GDateTime</span> object, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeCryptoContext.html#GMimeDecryptFlags" title="enum GMimeDecryptFlags"><span class="type">GMimeDecryptFlags</span></a>, to be used during decryption</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session_key</p></td>
<td class="parameter_description"><p>session key to use or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span> (can be <code class="literal">NULL</code>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-message-get-autocrypt-gossip-headers.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="gmime-gmime-autocrypt.html#GMimeAutocryptHeaderList" title="struct GMimeAutocryptHeaderList"><span class="type">GMimeAutocryptHeaderList</span></a> object,
or <code class="literal">NULL</code> on error. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GMimeMessage.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GMimeAddressType"></a><h3>enum GMimeAddressType</h3>
<p>An address type.</p>
<div class="refsect3">
<a name="GMimeAddressType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-SENDER:CAPS"></a>GMIME_ADDRESS_TYPE_SENDER</p></td>
<td class="enum_member_description">
<p>Represents the addresses in the Sender header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-FROM:CAPS"></a>GMIME_ADDRESS_TYPE_FROM</p></td>
<td class="enum_member_description">
<p>Represents the addresses in the From header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-REPLY-TO:CAPS"></a>GMIME_ADDRESS_TYPE_REPLY_TO</p></td>
<td class="enum_member_description">
<p>Represents the addresses in the Reply-To header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-TO:CAPS"></a>GMIME_ADDRESS_TYPE_TO</p></td>
<td class="enum_member_description">
<p>Represents the recipients in the To header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-CC:CAPS"></a>GMIME_ADDRESS_TYPE_CC</p></td>
<td class="enum_member_description">
<p>Represents the recipients in the Cc header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-ADDRESS-TYPE-BCC:CAPS"></a>GMIME_ADDRESS_TYPE_BCC</p></td>
<td class="enum_member_description">
<p>Represents the recipients in the Bcc header.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GMimeMessage-struct"></a><h3>struct GMimeMessage</h3>
<pre class="programlisting">struct GMimeMessage;</pre>
<p>A MIME Message object.</p>
<div class="refsect3">
<a name="GMimeMessage.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>